<template>
    <div class="collect">
        <div class="collect-header">
            <div class="collect-title">
                <i class="el-icon-collection-tag" style="color: #ff6700;"></i>
                我的收藏
            </div>
        </div>
        <div class="content">
            <div class="goods-list">
                <Collectlist :list="collectList" :isDelete="true"></Collectlist>
            </div>
        </div>
    </div>
</template>

<script>
import shoppingCartAPI from "../http/shoppingCartApi";
import Collectlist from "../components/CollectList.vue"

export default {
  data() {
    return {
      collectList: []
    };
  },
  created(){
      this.getCollect()
  },
  components: {
    Collectlist
  },
  methods: {
    async getCollect() {
      let { data: res } = await shoppingCartAPI.getCollect({user_id:5060});
      console.log(res.data);
      if (res.code === "001") {
        this.collectList = res.collectList;
        console.log(this.collectList);
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.collect {
  background-color: #f5f5f5;
}
.collect .collect-header {
  height: 64px;
  background-color: #fff;
  border-bottom: 2px solid #ff6700;
}
.collect .collect-header .collect-title {
  width: 1225px;
  margin: 0 auto;
  height: 64px;
  line-height: 58px;
  font-size: 28px;
}
.collect .content {
  padding: 20px 0;
  width: 1225px;
  margin: 0 auto;
}
.collect .content .goods-list {
  margin-left: -13.7px;
  overflow: hidden;
}
/* 收藏列表为空的时候显示的内容CSS */
.collect .collect-empty {
  width: 1225px;
  margin: 0 auto;
}
.collect .collect-empty .empty {
  height: 300px;
  padding: 0 0 100px 258px;
  margin: 65px 0 0;
  color: #b0b0b0;
  overflow: hidden;
}
.collect .collect-empty .empty h2 {
  margin: 70px 0 15px;
  font-size: 36px;
}
.collect .collect-empty .empty p {
  margin: 0 0 20px;
  font-size: 20px;
}
</style>